/*
 * JVM_Opcode.h
 *
 *  Created on: 03.01.2011
 *      Author: Tavin
 */

#include <stdint.h>

#include "JVM_DataTypes.h"
#include "JVM_StackFrame.h"
#include "JVM_Handle.h"
#include "JVM_StatusCodes.h"

#ifndef JVM_OPCODE_H_
#define JVM_OPCODE_H_


JVM_StackFrame_t * activeStackFrame;

#endif /* JVM_OPCODE_H_ */

#define cmd_Nop 0x00

#define cmd_aconst_null  	0x01

#define cmd_iconst_m1 		0x02


#define cmd_iconst_0 		0x03
#define cmd_iconst_1		0x04
#define cmd_iconst_2 	 	0x05
#define cmd_iconst_3		0x06
#define cmd_iconst_4 		0x07
#define cmd_iconst_5 		0x08

#define cmd_lconst_0		0x09
#define cmd_lconst_1 		0x0a

#define cmd_fconst_0 		0x0b
#define cmd_fconst_1 		0x0c
#define cmd_fconst_2 		0x0d

#define cmd_dconst_0 		0x0e
#define cmd_dconst_1		0x0f


#define cmd_bipush 			0x10

#define cmd_sipush 			0x11

#define cmd_ldc 			0x12
#define cmd_ldc_w			0x13

#define cmd_ldc2_w			0x14

#define cmd_iload			0x15
#define cmd_lload 			0x16
#define cmd_fload			0x17
#define cmd_dload			0x18

#define cmd_aload 			0x19

#define cmd_iload_0 		0x1a
#define cmd_iload_1 		0x1b
#define cmd_iload_2 		0x1c
#define cmd_iload_3 		0x1d


#define cmd_lload_0			0x1e
#define cmd_lload_1			0x1f
#define cmd_lload_2 		0x20
#define cmd_lload_3 		0x21

#define cmd_fload_0 		0x22
#define cmd_fload_1 		0x23
#define cmd_fload_2 		0x24
#define cmd_fload_3 		0x25

#define cmd_dload_0 		0x26
#define cmd_dload_1		 	0x27
#define cmd_dload_2 		0x28
#define cmd_dload_3 		0x29


#define cmd_aload_0			0x2a
#define cmd_aload_1 		0x2b
#define cmd_aload_2 		0x2c
#define cmd_aload_3 		0x2d

#define cmd_iaload 			0x2e
#define cmd_laload 			0x2f
#define cmd_faload 			0x30
#define cmd_daload 			0x31
#define cmd_aaload 			0x32
#define cmd_baload			0x33
#define cmd_caload 			0x34
#define cmd_saload 			0x35


#define cmd_istore 			0x36
#define cmd_lstore 			0x37
#define cmd_fstore 			0x38
#define cmd_dstore 			0x39
#define cmd_astore 			0x3a

#define cmd_istore_0 		0x3b
#define cmd_istore_1 		0x3c
#define cmd_istore_2 		0x3d
#define cmd_istore_3 		0x3e

#define cmd_lstore_0 		0x3f
#define cmd_lstore_1	 	0x40
#define cmd_lstore_2 		0x41
#define cmd_lstore_3 		0x42

#define cmd_fstore_0 		0x43
#define cmd_fstore_1 		0x44
#define cmd_fstore_2 		0x45
#define cmd_fstore_3 		0x46

#define cmd_dstore_0 		0x47
#define cmd_dstore_1 		0x48
#define cmd_dstore_2 		0x49
#define cmd_dstore_3 		0x4a

#define cmd_astore_0 		0x4b
#define cmd_astore_1 		0x4c
#define cmd_astore_2 		0x4d
#define cmd_astore_3 		0x4e

#define cmd_iastore 		0x4f
#define cmd_lastore 		0x50
#define cmd_fastore 		0x51
#define cmd_dastore 		0x52
#define cmd_aastore 		0x53
#define cmd_bastore 		0x54
#define cmd_castore 		0x55
#define cmd_sastore 		0x56

#define cmd_pop 			0x57
#define cmd_pop2 			0x58

#define cmd_dup 			0x59
#define cmd_dup_x1			0x5a
#define cmd_dup_x2 			0x5b

#define cmd_dup2 			0x5c
#define cmd_dup2_x1 		0x5d
#define cmd_dup2_x2 		0x5e

#define cmd_swap 			0x5f



#define cmd_iadd 			0x60
#define cmd_ladd 			0x61
#define cmd_fadd 			0x62
#define cmd_dadd 			0x63

#define cmd_isub 			0x64
#define cmd_lsub 			0x65
#define cmd_fsub 			0x66
#define cmd_dsub 			0x67

#define cmd_imul 			0x68
#define cmd_lmul			0x69
#define cmd_fmul 			0x6a
#define cmd_dmul 			0x6b

#define cmd_idiv 			0x6c
#define cmd_ldiv 			0x6d
#define cmd_fdiv 			0x6e
#define cmd_ddiv 			0x6f

#define cmd_irem 			0x70
#define cmd_lrem 			0x71
#define cmd_frem 			0x72
#define cmd_drem			0x73

#define cmd_ineg 			0x74
#define cmd_lneg 			0x75
#define cmd_fneg 			0x76
#define cmd_dneg 			0x77

#define cmd_ishl 			0x78
#define cmd_lshl 			0x79

#define cmd_ishr 			0x7a
#define cmd_lshr 			0x7b

#define cmd_iushr 			0x7c
#define cmd_lushr 			0x7d

#define cmd_iand 			0x7e
#define cmd_land 			0x7f

#define cmd_ior 			0x80
#define cmd_lor 			0x81

#define cmd_ixor 			0x82
#define cmd_lxor 			0x83

#define cmd_iinc 			0x84

#define cmd_i2l 			0x85
#define cmd_i2f				0x86
#define cmd_i2d 			0x87

#define cmd_l2i 			0x88
#define cmd_l2f 			0x89
#define cmd_l2d 			0x8a

#define cmd_f2i 			0x8b
#define cmd_f2l 			0x8c
#define cmd_f2d 			0x8d

#define cmd_d2i 			0x8e
#define cmd_d2l 			0x8f
#define cmd_d2f 			0x90

#define cmd_i2b 			0x91
#define cmd_i2c 			0x92
#define cmd_i2s 			0x93

#define cmd_lcmp	 		0x94
#define cmd_fcmpl 			0x95
#define cmd_fcmpg 			0x96
#define cmd_dcmpl 			0x97
#define cmd_dcmpg 			0x98

#define cmd_ifeq 			0x99
#define cmd_ifne 			0x9a
#define cmd_iflt 			0x9b
#define cmd_ifge 			0x9c
#define cmd_ifgt 			0x9d
#define cmd_ifle 			0x9e

#define cmd_if_icmpeq 		0x9f
#define cmd_if_icmpne 		0xa0
#define cmd_if_icmplt 		0xa1
#define cmd_if_icmpge 		0xa2


#define cmd_if_icmpgt 		0xa3
#define cmd_if_icmple 		0xa4
#define cmd_if_acmpeq 		0xa5
#define cmd_if_acmpne 		0xa6

#define cmd_goto 			0xa7

#define cmd_jsr 			0xa8
#define cmd_ret 			0xa9

#define cmd_tableswitch 	0xaa
#define cmd_lookupswitch 	0xab

#define cmd_ireturn 		0xac
#define cmd_lreturn 		0xad
#define cmd_freturn 		0xae
#define cmd_dreturn 		0xaf
#define cmd_areturn 		0xb0
#define cmd_return 			0xb1

#define cmd_getstatic 		0xb2
#define cmd_putstatic 		0xb3

#define cmd_getfield 		0xb4
#define cmd_putfield 		0xb5

#define cmd_invokevirtual 	0xb6
#define cmd_invokespecial 	0xb7
#define cmd_invokestatic 	0xb8
#define cmd_invokeinterface 0xb9

#define cmd_xxxunusedxxx1 	0xba
#define cmd_new 			0xbb

#define cmd_newarray 		0xbc
#define cmd_anewarray 		0xbd
#define cmd_arraylength 	0xbe

#define cmd_athrow 			0xbf

#define cmd_checkcast 		0xc0

#define cmd_instanceof 		0xc1

#define cmd_monitorenter 	0xc2
#define cmd_monitorexit 	0xc3

#define cmd_wide 			0xc4

#define cmd_multianewarray 	0xc5

#define cmd_ifnull 			0xc6
#define cmd_ifnonnull 		0xc7

#define cmd_goto_w 			0xc8

#define cmd_jsr_w 			0xc9

//Reserved opcodes:

#define cmd_breakpoint 	 	0xca

#define cmd_impdep1 		0xfe

#define cmd_impdep2 		0xff



uint16_t JVM_Opcode_execute();









/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_SetStackFrame						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_setActiveStackFrame(JVM_StackFrame_t * myStackFrame)
{
	activeStackFrame=myStackFrame;
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_StackFrame_pushValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

JVM_StackFrame_t static inline * JVM_Opcode_getActiveStackFrame()
{
	return(activeStackFrame);
}



/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushByteValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushByteValue(int8_t value)
{
	JVM_StackFrame_t *myStackFrame;

	int32_t intValue;

	intValue=value;

	myStackFrame=JVM_Opcode_getActiveStackFrame();
	JVM_StackFrame_pushIntValue(myStackFrame,intValue);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushShortValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushShortValue(int16_t value)
{
	JVM_StackFrame_t *myStackFrame;

	int32_t intValue;

	intValue=value;

	myStackFrame=JVM_Opcode_getActiveStackFrame();
	JVM_StackFrame_pushIntValue(myStackFrame,intValue);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushCharValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushCharValue(uint16_t value)
{
	JVM_StackFrame_t *myStackFrame;

	int32_t intValue;

	intValue=value;

	myStackFrame=JVM_Opcode_getActiveStackFrame();
	JVM_StackFrame_pushIntValue(myStackFrame,intValue);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushIntValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushIntValue(int32_t value)
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	JVM_StackFrame_pushIntValue(myStackFrame,value);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushReference						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushReference(JVM_HandleNumber_t reference)
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	JVM_StackFrame_pushIntValue(myStackFrame,reference);
	JVM_Handle_countUp(reference);
}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushLongValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushLongValue(int64_t value)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_pushLongValue(myStackFrame,value);

}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushFloatValue					Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushFloatValue(float value)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_pushFloatValue(myStackFrame,value);


}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_pushDoubleValue					Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_pushDoubleValue(double value)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_pushDoubleValue(myStackFrame,value);

}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_popIntValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

int32_t static inline JVM_Opcode_popIntValue()
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_popIntValue(myStackFrame));
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_popReferenceValue					Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

JVM_HandleNumber_t static inline JVM_Opcode_popReference()
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_popReference(myStackFrame));
}




/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_popLongValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

int64_t static inline JVM_Opcode_popLongValue()
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_popLongValue(myStackFrame));

}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_popFloatValue						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

float static inline JVM_Opcode_popFloatValue()
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	return(JVM_StackFrame_popFloatValue(myStackFrame));
}



/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_popDoubleValue					Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

double static inline JVM_Opcode_popDoubleValue()
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_popDoubleValue(myStackFrame));

}





/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_setIntVar							Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_setIntVar(uint16_t index,int32_t value)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_setIntVar(myStackFrame,index,value);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_setReferenceVar							Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_setReferenceVar(uint16_t index,JVM_HandleNumber_t reference)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_setReferenceVar(myStackFrame,index,reference);

}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_setIntVar							Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

void static inline JVM_Opcode_setLongVar(uint16_t index,int64_t value)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	JVM_StackFrame_setLongVar(myStackFrame,index,value);
}




/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getIntVar							Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

int32_t static inline JVM_Opcode_getIntVar(uint16_t index)
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_getIntVar(myStackFrame,index));

}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getReferenceVar					Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

JVM_HandleNumber_t static inline JVM_Opcode_getReferenceVar(uint16_t index)
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_getReferenceVar(myStackFrame,index));

}



/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getFloatVar						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

float static inline JVM_Opcode_getFloatVar(uint16_t index)
{
	JVM_StackFrame_t *myStackFrame;
	myStackFrame=JVM_Opcode_getActiveStackFrame();
	return(JVM_StackFrame_getFloatVar(myStackFrame,index));

}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getLongVar						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

int64_t static inline JVM_Opcode_getLongVar(uint16_t index)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	return(JVM_StackFrame_getLongVar(myStackFrame,index));

}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getDoubleVar						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

double static inline JVM_Opcode_getDoubleVar(uint16_t index)
{
	JVM_StackFrame_t *myStackFrame;

	myStackFrame=JVM_Opcode_getActiveStackFrame();

	return(JVM_StackFrame_getDoubleVar(myStackFrame,index));

}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getCodeByte						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint8_t  static inline JVM_Opcode_getCodeByte()
{
	return(activeStackFrame->currentMethod->code[activeStackFrame->PC++]);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getCodeShort						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint16_t  static inline JVM_Opcode_getCodeShort()
{
	uint16_t tmpShort;

	tmpShort=(activeStackFrame->currentMethod->code[activeStackFrame->PC++])<<8;
	tmpShort+=activeStackFrame->currentMethod->code[activeStackFrame->PC++];

	return(tmpShort);
}


/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getCodeInt						Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.2.1			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint16_t  static inline JVM_Opcode_getCodeInt()
{
	uint16_t tmpShort;

	tmpShort=(activeStackFrame->currentMethod->code[activeStackFrame->PC++])<<24;
	tmpShort+=(activeStackFrame->currentMethod->code[activeStackFrame->PC++])<<16;
	tmpShort+=(activeStackFrame->currentMethod->code[activeStackFrame->PC++])<<8;
	tmpShort+=activeStackFrame->currentMethod->code[activeStackFrame->PC++];

	return(tmpShort);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_movePC							Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint16_t  static inline JVM_Opcode_movePC(int16_t offset)
{
	activeStackFrame->PC+=offset;

	// TODO Check for codesize and -> throw 	return(STCD_CODE_SIZE_OVERFLOW)

	return(STCD_OK);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_setPC								Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.4			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint16_t  static inline JVM_Opcode_setPC(int16_t address)
{
	activeStackFrame->PC=address;

	// TODO Check for codesize and -> throw 	return(STCD_CODE_SIZE_OVERFLOW)

	return(STCD_OK);
}

/****************************************************************************************/
/*																						*/
/*	Function : JVM_Opcode_getPC								Author : OG					*/
/*																						*/
/*	Description : 								   										*/
/*																						*/
/*	Version : 1.0					Date :2011.1.16			Status : Working   			*/
/*																						*/
/****************************************************************************************/

uint16_t  static inline JVM_Opcode_getPC()
{
	return(activeStackFrame->PC);
}
